<template>
  <page-header-wrapper>
    <a-card>
      <p class="text-3xl">基本信息</p>
      <div class="ml-8">
        <p class="text-lg">登录名：{{ currentUser.name }}</p>
        <p class="text-lg">用户名：{{ currentUser.username }}</p>
        <p class="text-lg">角色：{{ currentUser.role.roleName }}</p>
        <p class="text-lg">公司：{{ currentUser.company }}</p>
        <p class="text-lg">邮箱：{{ currentUser.email }}</p>
        <p class="text-lg">手机号：{{ `${currentUser.areaCode}-${currentUser.phone}` }}</p>
      </div>
    </a-card>
  </page-header-wrapper>
</template>

<script>
import { getUserInfo } from '@/api/common'
export default {
  data() {
    return {}
  },
  mounted() {
    // this.getData()
  },
  computed: {
    currentUser() {
      return this.$store.getters.userInfo
    }
  }
  // methods: {
  //   async getData() {
  //     const res = await getUserInfo()
  //     const data = res.result.data
  //     this.name = data.name
  //     this.username = data.username
  //     this.role = data.role.roleName
  //     this.company = data.company
  //     this.email = data.email
  //     this.areaCode = data.areaCode
  //     this.phone = data.phone
  //   }
  // }
}
</script>

<style lang="less" scoped></style>
